export function deFn (callback, time) {
  let i = 0
  return function () {
    const arg = arguments
    clearTimeout(i)
    i = setTimeout(() => {
      callback.apply(this, arg)
    }, time)
  }
}
